<template>
	<view class="u-p-20">
		
		
		
		<!-- #ifdef MP-WEIXIN-->
	<view class="" style="min-height: 200px;"  v-if="buttomAdInfo">
		<base-ad :adInfo="buttomAdInfo"></base-ad>
		
	</view>
		<!-- #endif -->
		
		<!-- #ifdef APP-ANDROID || H5 -->
	<view class="" style="height: 200px;"  v-if="buttomAdInfo">
		<base-ad :adInfo="buttomAdInfo"></base-ad>
		
	</view>
		<!-- #endif -->
		<u-parse :html="content"></u-parse>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content: '',
				buttomAdInfo:null,
			}
		},
		onLoad(obj) {
			uni.setNavigationBarTitle({
				title: obj.type
			})
			this.commApi(obj.type == '关于我们' ? 'about_us' : obj.type == '帮助中心' ? 'help_center' : 'service_telephone')
			this.getButtomAd()
		},
		methods: {
			getButtomAd() {
				this.$api.getAd({
					pos: 'help_center'
				}, res => {
					console.log(res)
					this.buttomAdInfo = res.data.data
				})
			},
			commApi(apiName) {
				this.$api[apiName]({}, res => {
					if (res.data.code == 1) {
						this.content = res.data.data
					}
				})
			}
		}
	}
</script>

<style scoped>
	page {
		background-color: #f5f5f5;
	}

	.one {
		margin-top: 20rpx;
		width: 710rpx;
		height: 213rpx;
		/* background: url('https://www.sqkjkj.vip/wxImg/orderlist/img3.png') no-repeat;
		background-size: 100% 100%; */
	}

	.bgc {
		background: #F4F4F4;
	}

	.bgc1 {
		background: #FFF2F2;
		border: 1rpx solid #FC3533;
	}

	.error {
		width: 74rpx;
		height: 160rpx;
		background: url('https://www.sqkjkj.vip/wxImg/common/home/img12.png') no-repeat;
		background-size: 100% 100%;
	}
</style>